<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>原型链，工厂模式</title>
</head>
<body>
    

    <script type="text/javascript">
        function sup () {
            this.supValue = true;
        }
        sup.prototype.getsupValue = function () {
            return this.supValue;
        }
        
        function sub () {
            this.subValue = false;
        }

        sub.prototype = new sup();
        sub.prototype.getsubValue = function () {
            return this.subValue;
        }

        // console.log(sup.prototype._proto_);

        var instance = new sub();
        console.log(instance.getsupValue());
        console.log(instance.getsubValue());
         
    </script>
</body>
</html>